Configure Dependabot to monitor @github/copilot npm updates#94
Conversation
- Add npm ecosystem entry for scripts/codegen/ directory - Filter to @github/copilot package only (daily schedule) - Add github-actions ecosystem entry for workflow updates (weekly) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
I already did this locally. Ran terminal command: pip3 install --quiet check-jsonschema && check-jsonschema --schemafile /tmp/dependabot-2.0-schema.json .github/dependabot.yml Ran terminal command: /Users/edburns/Library/Python/3.9/bin/check-jsonschema --schemafile /tmp/dependabot-2.0-schema.json .github/dependabot.yml Validation passed. The |
There was a problem hiding this comment.
Pull request overview
Configures Dependabot to automatically track upstream dependency updates relevant to keeping the SDK’s generated code and workflows in sync with the reference implementation.
Changes:
- Add a Dependabot
npmupdate configuration for/scripts/codegenon a daily schedule. - Restrict npm updates to the
@github/copilotpackage and limit open PRs to 1. - Add a weekly Dependabot configuration for
github-actionsupdates.
Show a summary per file
| File | Description |
|---|---|
| .github/dependabot.yml | Adds Dependabot update entries for npm codegen dependencies and GitHub Actions workflow versions. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
…ma changes --- ## Summary Updates the Java code generator and handwritten SDK/test code to handle the `@github/copilot` 1.0.35 schema format, which changed from inline nested type definitions to `$ref` references pointing to `#/definitions/` entries. Without this fix, regenerated types were missing fields and the build failed. 75 files changed, 616 insertions(+), 1836 deletions(-) ## Changes ### Code generator (`scripts/codegen/java.ts`) - Added `resolveRef()` helper to dereference `$ref` pointers in JSON schemas. - Added `pendingStandaloneTypes` map to collect types referenced via `$ref` and generate them as top-level Java files instead of nested records. - Added `generatePendingStandaloneTypes()`, `generateStandaloneEnum()`, and `generateStandaloneRecord()` to emit the new standalone types. - Updated all property/field generation paths to resolve `$ref` before inspecting type, enum, or nested-object shapes. ### Regenerated files (`src/generated/java/`) - ~65 generated source files updated — nested inner records/enums replaced by standalone types (e.g. `McpServer`, `Plugin`, `Skill`, `Tool`, `Model`, `AccountQuotaSnapshot`, `DiscoveredMcpServer`, `UIElicitationSchema`, `UIElicitationResponseAction`, `ModelCapabilitiesOverride`, etc.). - Several numeric fields changed from `double` to `Long` (`PingResult`, `SessionShellExecParams`, model capability limits). - New RPC API class `ServerMcpConfigApi` and `SessionPermissionsApi` added. ### Handwritten source (`CopilotSession.java`) - Updated all type references from old nested types to new standalone types (e.g. `SessionMcpListResultServersItem` → `McpServer`). ### Test files (5 files) - **`GeneratedRpcRecordsCoverageTest.java`** — Replaced all nested type references with standalone types; fixed `double` → `Long` constructors. - **`GeneratedEventTypesCoverageTest.java`** — Updated event type name set. - **`GeneratedRpcApiCoverageTest.java`** — Updated `workspace` → `workspaces`, added `SessionLogLevel`, new API classes. - **`RpcWrappersTest.java`** — `session.workspace` → `session.workspaces`. - **`SessionEventDeserializationTest.java`** — Updated JSON keys for `compactionTokensUsed` (`input` → `inputTokens`, `output` → `outputTokens`, `cachedInput` → `cacheReadTokens`). ### Dependency bump - `@github/copilot` 1.0.24 → 1.0.35 in `scripts/codegen/package.json`. - **`.github/workflows/update-copilot-dependency.yml`** — After codegen and PR creation, `mvn verify` is run. On failure, the agentic fix workflow is triggered. Includes a polling loop that waits for the fix to complete and runs a final verification. ## Design The pipeline follows a two-workflow pattern: 1. **Trigger workflows** (`codegen-check.yml`, `update-copilot-dependency.yml`) detect failures and dispatch the agentic fix. 2. **Fix workflow** (`codegen-agentic-fix.lock.yml`) runs under gh-aw guardrails with scoped permissions, network firewall, and MCP gateway. It checks out the branch, reproduces the failure, applies fixes to handwritten code only, and pushes via `push-to-pull-request-branch` safe-output. Key constraints enforced on the agent: - Never modify `src/generated/java/`, `pom.xml`, `scripts/codegen/`, or `.github/` - Maximum 3 fix attempts before escalating via PR comment - Must run `mvn spotless:apply` before committing - Only pushes if `mvn verify` passes ## Testing - All workflow files pass `actionlint` with zero errors - The `codegen-agentic-fix.lock.yml` was successfully compiled by `gh aw compile v0.68.3` - End-to-end testing will occur when this PR and github#94 are both merged — Dependabot PR github#99 (bump `@github/copilot` 1.0.24 → 1.0.35) already exists and its Codegen Check is failing as expected
Related to #93 .
Before the change?
After the change?
Pull request checklist
mvn spotless:applyhas been run to format the codemvn clean verifypasses locallyDoes this introduce a breaking change?